import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../layout/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/CakeList',
    name: 'CakeList',
    component: () =>
      import(/* webpackChunkName: "index" */ '../views/CakeList/index.vue')
  },
  {
    path: '/Login',
    name: 'Login',
    component: () =>
      import(/* webpackChunkName: "Login" */ '../views/login/index.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () =>
      import(/* webpackChunkName: "register" */ '../views/register/index.vue')
  },
  {
    path: '/About',
    name: 'About',
    component: () =>
      import(/* webpackChunkName: "About" */ '../views/About/About.vue')
  },
  {
    path: '/BrandList',
    name: 'BrandList',
    component: () =>
      import(
        /* webpackChunkName: "BrandList" */ '../views/BrandList/BrandList.vue'
      )
  },
  {
    path: '/BrandDetails',
    name: 'BrandDetails',
    component: () =>
      import(
        /* webpackChunkName: "BrandDetails" */ '../views/BrandDetails/BrandDetails.vue'
      )
  },
  {
    path: '/GoodsDetails',
    name: 'GoodsDetails',
    component: () =>
      import(
        /* webpackChunkName: "GoodsDetails" */ '../views/GoodsDetails/GoodsDetails.vue'
      )
  },
  {
    path: '/locations',
    name: 'Location',
    component: () =>
      import(/* webpackChunkName: "locations" */ '../views/Locations/index.vue')
  },
  {
    path: '/search',
    name: 'Search',
    component: () =>
      import(/* webpackChunkName: "Search" */ '../views/Search/index.vue')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () =>
      import(/* webpackChunkName: "Cart" */ '../views/GoodsCart/index.vue')
  }
]

// component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')

const router = new VueRouter({
  routes
})

export default router
